package com.yue.ssa.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yue.ssa.bean.RespBean;
import com.yue.ssa.bean.User;
import com.yue.ssa.exception.MyException;
import org.springframework.security.core.userdetails.UserDetailsService;


public interface UserService extends IService<User>, UserDetailsService {

    RespBean current();

    RespBean page(String keyword, Integer pageNo, Integer pageSize);

    RespBean add(User user);

    RespBean update(User user);

    RespBean get(String id) throws MyException;

    boolean usernameIsExist(String username);

    RespBean delete(String[] ids);

    RespBean changePassword(String oldPassword, String newPassword);

    RespBean resetPassword(String id);

    User getByEmail(String email);
}
